
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Docker安装说明 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../Docker镜像加速/Docker阿里云镜像加速器配置.html" />
    
    
    <link rel="prev" href="../Docker概念/docker基础概念.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    简介
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Docker概念/docker基础概念.html">
            
                <a href="../Docker概念/docker基础概念.html">
            
                    
                    Docker概念
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.2" data-path="docker安装流程Linux.html">
            
                <a href="docker安装流程Linux.html">
            
                    
                    Docker安装说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../Docker镜像加速/Docker阿里云镜像加速器配置.html">
            
                <a href="../Docker镜像加速/Docker阿里云镜像加速器配置.html">
            
                    
                    Docker的镜像加速
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../Docker运行hello-world/Docker运行hello-world.html">
            
                <a href="../Docker运行hello-world/Docker运行hello-world.html">
            
                    
                    Docker运行hello-world
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../Docker运行底层原理/Docker运行底层原理.html">
            
                <a href="../Docker运行底层原理/Docker运行底层原理.html">
            
                    
                    Docker运行底层原理
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    命令
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Docker常用命令.html">
            
                <a href="../Docker常用命令.html">
            
                    
                    Docker常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Docker镜像命令.html">
            
                <a href="../Docker镜像命令.html">
            
                    
                    Docker镜像命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../Docker容器命令.html">
            
                <a href="../Docker容器命令.html">
            
                    
                    Docker容器命令
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    原理
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Docker镜像.html">
            
                <a href="../Docker镜像.html">
            
                    
                    Docker镜像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Docker容器数据卷.html">
            
                <a href="../Docker容器数据卷.html">
            
                    
                    Docker容器数据卷
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../DockerFile解析.html">
            
                <a href="../DockerFile解析.html">
            
                    
                    DockerFile解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Docker常用安装.html">
            
                <a href="../Docker常用安装.html">
            
                    
                    Docker常用安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../本地镜像发布到阿里云.html">
            
                <a href="../本地镜像发布到阿里云.html">
            
                    
                    本地镜像发布到阿里云
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Docker安装说明</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="docker&#x5B89;&#x88C5;&#x6D41;&#x7A0B;linux">docker&#x5B89;&#x88C5;&#x6D41;&#x7A0B;Linux</h2>
<h4 id="centos6&#x7248;&#x672C;&#x5B89;&#x88C5;">centos6&#x7248;&#x672C;&#x5B89;&#x88C5;</h4>
<ol>
<li><code>yum install -y epel-release</code></li>
<li><p><code>yum install -y docker-io</code></p>
</li>
<li><p>&#x5B89;&#x88C5;&#x540E;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;<code>/etc/sysconfig/docker</code></p>
</li>
<li><p>&#x542F;&#x52A8;Docker&#x540E;&#x53F0;&#x670D;&#x52A1;<code>service docker start</code></p>
</li>
<li><p>docker version &#x9A8C;&#x8BC1;</p>
</li>
</ol>
<hr>
<h4 id="centos7&#x7248;&#x672C;&#x5B89;&#x88C5;">centos7&#x7248;&#x672C;&#x5B89;&#x88C5;</h4>
<p>&#x6587;&#x6863; <a href="https://docs.docker.com" target="_blank">https://docs.docker.com</a></p>
<p>&#x5378;&#x8F7D;&#x8001;&#x7248;&#x672C;&#xFF1A; &#x5047;&#x5982;&#x4E4B;&#x524D;&#x5B89;&#x88C5;&#x8FC7;&#x3002;</p>
<pre><code class="lang-python">$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine
</code></pre>
<hr>
<pre><code>yum install -y yum-utils
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --enable docker-ce-nightly
yum-config-manager --enable docker-ce-test
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
docker run hello-world

&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF1A;
/etc/docker/daemon.json
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../Docker概念/docker基础概念.html" class="navigation navigation-prev " aria-label="Previous page: Docker概念">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../Docker镜像加速/Docker阿里云镜像加速器配置.html" class="navigation navigation-next " aria-label="Next page: Docker的镜像加速">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Docker安装说明","level":"1.2.2","depth":2,"next":{"title":"Docker的镜像加速","level":"1.2.3","depth":2,"path":"Docker镜像加速/Docker阿里云镜像加速器配置.md","ref":"Docker镜像加速/Docker阿里云镜像加速器配置.md","articles":[]},"previous":{"title":"Docker概念","level":"1.2.1","depth":2,"path":"Docker概念/docker基础概念.md","ref":"Docker概念/docker基础概念.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"Docker安装/docker安装流程Linux.md","mtime":"2020-12-23T06:21:06.499Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-03-19T07:46:19.806Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

